package com.wdb007.venus.svc.dal.order.dao;

import java.math.BigDecimal;
import java.util.List;

import com.wdb007.venus.svc.dal.book.model.BRBookTransDO;
import com.wdb007.venus.svc.dal.book.model.BookChargeDO;
import com.wdb007.venus.svc.dal.book.model.BorrowingBookDO;
import com.wdb007.venus.svc.dal.book.model.BorrowingBookQueryDO;
import com.wdb007.venus.svc.dal.book.model.GridCodeAndBorrowDateDO;
import com.wdb007.venus.svc.dal.order.model.BorrowingCostDO;
import com.wdb007.venus.svc.dal.order.model.OrderTransDO;
import com.wdb007.venus.svc.dal.order.model.SortedRfidCode;
import com.wdb007.venus.svc.dal.user.model.UserBorrowListDO;
import com.wdb007.venus.svc.dal.user.model.UserBorrowPageDO;

public interface OrderTransDAO {
	
    int remove(Long id);

    int insert(OrderTransDO record);

    OrderTransDO get(Long id);

    int update(OrderTransDO record);
    
    int getBorrowedCount(Long userid);
    
    int getBorrowingCount(Long userid);
    
    int getLongestBorrowDay(Long userid);
    
    List<BRBookTransDO> getBrList(Long gridTransId);
    
    OrderTransDO getByRfidCodeAndStatus(OrderTransDO query);

	int count(OrderTransDO orderTransDo);
	
	List<BorrowingBookDO> getBorrowingList(BorrowingBookQueryDO query);
	
	List<GridCodeAndBorrowDateDO> getGridCodeByUser(Long userId);
    
	List<BorrowingCostDO> getBorrowingCost(Long userId);
	
	List<String> getBorrowedUserImg(String isbn);
	
	int countBorrowedUserImg(String isbn);
	
	List<BookChargeDO> getRentBookList();
	
	BigDecimal getBorrowCost(Long userid);
	
	List<UserBorrowListDO> getBorrowedList(UserBorrowPageDO pageDO);
	
	int countBorrowedList(UserBorrowPageDO pageDO);
	
	int countTotalReadRecord(Long userId);
	
	int countMonthReadRecord(Long userId);
	
	int countWeekReadRecord(Long userId);
	
	int countByVIPCharge(Long userId);
	
	int countByUserIdAndBorrowPrice(OrderTransDO query);
	
	Integer getRankByVIPQuery(OrderTransDO query);
	
	int countByGridTransId(Long gridTransId);
	
	List<String> getSortedRfidCodeList(SortedRfidCode sortedRfidCode);

	int countOverQuotaByUserId(Long userId);
	
	List<OrderTransDO> getBorrowingListByUserId(Long userId);
	
	int countCurrentDateReturnByUserId(Long userId);
	
	int getLastestLockMinites(Long userId);
}